<html>

<head>
    <script src="jquery-3.2.1.min.js"></script>
    <script>
 function hide_p(){
     $('p').hide();//元素选择器
 }
 function hide_by_id(id){
     $('#'+id).hide();
 }
    </script>

</head>
<p>the first p</p>
<p>the senconde p</p>
<input id="tb_hide" type="text" value="test text" />
<button type="button" onclick="hide_p()">hide p  element</button>
<button type="button" onclick="hide_by_id('tb_hide')">hide   element  by id</button>

</html>